System and method for implementation motion-driven multi-shot image stabilization

ABSTRACT

An improved system and method for capturing an image using a camera or a camera module. In the present invention, the number of image shots taken, as well as the integration time of each image shot, are controlled based upon knowledge about the existence or absence of camera motion. Whenever a motion is detected above a predetermined motion threshold, the integration phase of the current image shot ends, and the integration of the next image shot begins. The present invention therefore adapts to the actual camera motion during exposure. If there is no camera motion, a single, long exposed image shot is captured. If there is camera motion, the total exposure time is divided between multiple shots in accordance with the degree of camera motion.

FIELD OF THE INVENTION

The present invention relates generally to the field of cameras andcamera modules. More particularly, the present invention relates tosystems for improving image stabilization in cameras and camera modules.

BACKGROUND OF THE INVENTION

Since the beginning of photography, image stabilization has been aconsistent issue. The problem of ensuring that a photograph is notblurred due to camera movement has remained an issue even as cameratechnology has progressed to the present day. In digital cameras, theproblem of image stabilization stems from fact that any known imagesensor needs to have the image projected on it during a period of timereferred to herein as integration time. Any motion of the camera duringthis time causes a shift of the image projected on the sensor, resultingin a degradation of the final image. This degradation is referred toherein as motion blur.

One of the principal difficulties in restoring motion blurred imagesinvolves the fact that the motion blur is different in each degradedimage. The level of motion blur depends upon the camera motion thattakes place during the exposure time.

The ongoing development and miniaturization of consumer devices thathave image acquisition capabilities increases the need for robust andefficient image stabilization solutions. The need is driven by two mainfactors. The first factor is the inherent difficulty in avoidingunwanted motion during the integration time when using a small hand-helddevice, such a camera telephone. The second factor is the need forlonger integration times due to the small pixel area that results fromthe miniaturization of the image sensors in conjunction with theincrease in image resolution. The smaller the pixel area, the fewerphotons/second can be captured by the pixel. Therefore, a longerintegration time is needed for satisfactory results.

Currently, there are two categories of conventional solutions foraddressing image stabilization. These solutions are referred to assingle-shot and multi-shot solutions. Single-shot solutions aresolutions based upon capturing a single image shot during a longexposure time. This is the classical system for image capturing, wherethe acquired image is typically corrupted by motion blur, caused by themotion that took place during the exposure time. In order to restore theimage, it is necessary to have very accurate knowledge about the motionthat took place during the exposure time. Consequently, this approachmay require expensive motion sensors (i.e., in the form of gyroscopes),which are also large in size and therefore difficult to include in smalldevices. In addition, if the exposure time is large, then the positioninformation derived from the motion sensor output exhibits a bias drifterror with respect to the true value. The bias drift error accumulatesover time such that the outcome of the process can be significantlycorrupted over time.

Several entities have implemented a particular type of single-shotsolution in high-end cameras. This approach involves compensating forthe motion by moving the optics or the sensor in order to keep the imageprojected onto the same position of the sensor during the exposure time.However, this solution also suffers from system drift error and istherefore not practical for long exposure times.

In contrast, multi-shot solutions are based upon dividing a longexposure time into several shorter intervals by capturing several imageshots of the same scene. The exposure time for each shot is small inorder to reduce the motion blur degradation of the individual shots.After capturing all these shots, the final image is calculated in twosteps. The first step involves registering all image shots with respectto the first image shot. This is referred to as the registration step.The second step, referred to as pixel fusion, involves calculating thevalue of each pixel in the final image based upon its values in each ofthe individual shots. One simple method of pixel fusion involvescalculating the final value of each pixel as the average of its valuesin the individual shots.

Although resolving some of the issues discussed above, multi-shotsolutions require a large amount of computational resources in order tocapture several high resolution frames during a short interval of time.In addition, these methods also require a large amount memory in orderto store the captured image shots before the pixel fusion step. This canbe especially expensive to implement in smaller devices where memoryresources may be quite limited.

SUMMARY OF THE INVENTION

The present invention provides for a hybrid approach between multi-shotand single-shot solutions for image capture. In the present invention,the number of image shots taken, as well as the integration time of eachimage shot, are controlled based upon knowledge about the existence orabsence of any camera motion. Whenever a motion is detected, theintegration phase of the current image shot ends, and the integration ofthe next image shot begins. The present invention therefore adapts tothe actual camera motion during exposure. If there is no camera motion,a single, long exposed image shot is captured. If there is cameramotion, the total exposure time is divided between multiple shots inaccordance with the degree of camera motion.

The present invention includes a method of capturing an image using acamera over an image capture period. The method comprises starting anintegration phase for capturing a frame. If a motion above apredetermined motion threshold is detected in the camera, or if the endof a predetermined integration period is reached, the integration phaseis ended, and the captured frame is saved. If the time of theintegration phase for the captured frame does not reach the time of theimage capture period, frames continue to be captured and saved until atotal time of the integration phases reaches the time of the imagecapture period, after which a final picture is created by combining eachof the captured frames.

The present invention also includes a computer program product forcapturing an image using a camera over an image capture period. Thecomputer program product comprises computer code for starting anintegration phase for capturing a frame; computer code for, if a motionabove a predetermined motion threshold is detected in the camera, or ifthe end of a predetermined integration period is reached, ending theintegration phase and saving the captured frame; computer code for, ifthe time of the integration phase for the captured frame does not reachthe time of the image capture period, continuing to capture and saveframes until a total time of the integration phases reaches the time ofthe image capture period; and computer code for creating a final pictureby combining each of the captured frames.

The present invention still further includes an electronic devicecomprising a processor and a memory unit operatively connected to theprocessor. The memory unit includes computer code for starting anintegration phase for capturing a frame; computer code for, if a motionabove a predetermined motion threshold is detected in the camera, or ifthe end of a predetermined integration period is reached, ending theintegration phase and saving the captured frame; computer code for, ifthe time of the integration phase for the captured frame does not reachthe time of the image capture period, continuing to capture and saveframes until a total time of the integration phases reaches the time ofthe image capture period; and computer code for creating a final pictureby combining each of the captured frames.

The present invention also comprises a camera module. The camera modulecomprises a lens positioned for focusing an image; a sensor unitreceiving the image focused by the lens; a processor operativelyconnected to the sensor unit; and a memory unit operatively connected tothe processor. The memory unit includes computer code for starting anintegration phase for capturing a frame, computer code for, if a motionabove a predetermined motion threshold is detected in the camera module,or if the end of a predetermined integration period is reached, endingthe integration phase and saving the captured frame, computer code for,if the time of the integration phase for the captured frame does notreach the time of the image capture period, continuing to capture andsave frames until a total time of the integration phases reaches thetime of the image capture period, and computer code for creating a finalpicture by combining each of the captured frames.

The present invention further includes computer program for capturing animage using a camera module over an image capture period. The computerprogram comprises means for starting an integration phase for capturinga frame; means for, if a motion above a predetermined motion thresholdis detected in the camera, or if the end of a predetermined integrationperiod is reached, ending the integration phase and saving the capturedframe; means for, if the time of the integration phase for the capturedframe does not reach the time of the image capture period, continuing tocapture and save frames until a total time of the integration phasesreaches the time of the image capture period; and computer code forcreating a final picture by combining each of the captured frames.

The present invention provides for a number of substantial advantagesnot available in conventional systems. With the present invention, thereis no need to use expensive motion sensors, as the motion must be onlydetected and not measured. Simple motion sensors can provide very goodresults for this purpose. For example, accelerometers are much smallerand less expensive than gyroscopes and therefore could be particularlyuseful for the purpose of the invention. It also may be possible to usetwo or more accelerometers distributed along the device's borders inorder to sense rotational motion in addition to linear translation.

With the present invention, the number of image shots captured duringexposure is reduced to a minimum, reducing the computational cost ofprocessing many image shots and the memory requirements compared to theclassical multi-shot approach. In addition, the present invention allowsfor the adjustment of the level of the motion detection threshold inaccordance with the state of the system. For example, the thresholdcould be adjusted in accordance to the zoom ratio used when capturingthe image. Therefore, when using a large zoom ratio, a small thresholdwould be needed because even a small motion could cause a significantshift of the image projected onto the image sensor. On the other hand,when using a zoom×1, the same motion could result in a very small shift,which does not justify the interruption of the exposure time for thecurrent frame.

The system and method of the present invention possesses all of theadvantages of the multi-shot technique described above. In particular,the use of the present invention results in a small level of noisesensitivity, and the present invention does not require the system toapply inverse filtering to restore the image. At the same time, thepresent invention possesses the advantages of the single shot technique,namely the small memory requirements and low computational cost due tothe small number of captured image shots.

These and other advantages and features of the invention, together withthe organization and manner of operation thereof, will become apparentfrom the following detailed description when taken in conjunction withthe accompanying drawings, wherein like elements have like numeralsthroughout the several drawings described below.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a sectional side view of a generic digital camera according tothe principles of the present invention;

FIG. 2 is a perspective view of a mobile telephone that can be used inthe implementation of the present invention;

FIG. 3 is a schematic representation of the telephone circuitry of themobile telephone of FIG. 2;

FIGS. 4( a)-4(c) are illustrations showing the differences between aclassical single-shot approach for reducing image blur, conventionalmulti-shot techniques, and the motion-driven multi shot approach of thepresent invention; and

FIG. 5 is a flow chart showing the implementation of one embodiment ofthe present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

A generic camera module constructed according to the principles of thepresent invention is shown at 110 in FIG. 1. The camera module 110 canbe a stand-alone device or can be incorporated into another electronicdevice, such as a portable telephone. The camera module 110 includes ahousing 111 which contains at least one lens 112, a primary memory unit114, a camera processor 116, and at least one image sensor 118. Theprimary memory unit 114 can be used to store digital images and computersoftware for performing various functions in the camera module 110, aswell as to implement the present invention. A removable, secondarymemory unit 120 in the form of a memory card can also be included in thedigital camera to provide extra memory space. The image sensor 118 canbe a charge coupled device (CCD), a complementary metal oxidesemiconductor (CMOS), or another system. The camera module 110 alsoincludes at least one motion sensor 130 operatively connected to thecamera processor 116. When a picture of an object 128 is taken, the atleast one lens 112 focuses the image onto the at least one image sensor118 which records light electronically. The camera processor 116 thenbreaks this electronic information down into digital data which can bestored on the primary memory unit 114 and/or the secondary memory unit120.

FIGS. 2 and 3 show one representative mobile telephone 12 upon which thepresent invention may be implemented. However, it is important to notethat the present invention is not limited to any type of electronicdevice and could be incorporated into devices such as personal digitalassistants, personal computers, and other devices. It should beunderstood that the present invention could be incorporated on a widevariety of mobile telephones 12. The mobile telephone 12 of FIGS. 2 and3 includes a housing 30, a display 32 in the form of a liquid crystaldisplay, a keypad 34, a microphone 36, an ear-piece 38, a battery 40, aninfrared port 42, an antenna 44, a smart card 46 in the form of auniversal integrated circuit card (UICC) according to one embodiment ofthe invention, a card reader 48, radio interface circuitry 52, codeccircuitry 54, a controller 56 and a memory 58. It should be noted thatthe controller 56 can be the same unit or a different unit than thecamera processor 116. The memory 58 may or may not be the same componentas the primary memory unit 114 in various embodiments of the presentinvention. Individual circuits and elements are all of a type well knownin the art, for example in the Nokia range of mobile telephones.

The present invention involves the controlling of the number of imageshots that are taken by a camera or camera module. In particular, thepresent invention involves the adjustment of the integration time ofeach image shot based upon the existence or absence of any cameramotion. Whenever a motion is detected, the integration phase of thecurrent image shot ends, and the integration of the next image shotbegins. The present invention therefore adapts to the actual cameramotion during exposure. If there is no camera motion, a single, longexposed image shot is captured. If there is camera motion, the totalexposure time is divided between multiple shots in accordance with thedegree of camera motion. The present invention provides for a hybridsolution between the single shot approach and the multi-shot approach,wherein a multi-shot technique is driven by the presence or absence ofcamera motion detected with the assistance of one or more motionsensors.

The present invention involves maintaining the exposure phase of eachindividual image shot for as long of a period as there is no motion, orwhere the motion detected by the motion sensors is bellow a certainthreshold value. As soon as a motion is sensed (or a motion above thethreshold is detected), then the integration of the current shot ends,and a new integration phase begins for the next shot.

The present invention does not require accurate information about theprecise magnitude of motion of the camera or camera module, meaning thatno sophisticated motion sensors are required. Because the presentinvention only requires a mechanism for detecting the presence orabsence of motion, and does not have to accurately measure the motiontrajectory, small and inexpensive motion sensors such as accelerometersmay be used with the present invention. Such presence or absence ofmotion can be easily determined by comparing the output value of themotion sensor or sensors with a given threshold, referred to herein as amotion detection threshold.

In addition to the above, the present invention permits the camera orcamera module to adapt both the number of shots and the exposure time ofeach shot in accordance with the camera motion. If no motion is detectedby the motion sensor or sensors, then the camera or camera module simplytakes a single shot during the given exposure time. On the other hand,if the motion sensor or sensors detects motion of the camera or cameramodule, then the given exposure time is divided between multiple imageshots. This adaptive approach ensures a minimum number of shots inaccordance with the existing motion during exposure.

The implementation of one general embodiment of the present inventioninvolves controlling the camera shutter by software or hardware methodssuch that the shutter closes whenever a motion is detected. There are anumber of basic aspects that are taken into consideration in theimplementation of various embodiments of the invention. For example, aminimum exposure time for a frame should be established. This is neededin order to avoid very short frames, if motion is detected immediatelyupon beginning the exposure. Additionally, a maximum total integrationtime (i.e., the sum of the individual integration times for each shot)also needs to be set. The maximum total integration time for each frameis needed in order to establish a reasonable limit for the integrationtime in case there is no motion and only one frame is captured. Lastly,a motion detection threshold should be set. The motion detectionthreshold represents the minimum value of the motion magnitude (e.g.acceleration), below the system will be treated as if there is no motionoccurring that could affect the photograph. The motion detectionthreshold is used to differentiate “motion” and “no motion” situationsfrom the point of view of the values generated by the motion sensor orsensors.

FIGS. 4( a)-4(c) depict the differences between conventional single shotapproaches, conventional multi-shot approaches, and the approach of thepresent invention. FIG. 4( a) shows the single-shot approach, where asingle integration phase 500 is used to capture an image shot during thetime between an integration time start 510 and an integration time stop520. FIG. 4( b) shows the multi-shot approach, where there are severalintegration phases 500 over the same time period, each with its ownintegration time start 510 and integration time stop 520. For eachintegration phase 500, the length of time between the integration timestart 510 and the integration time stop 520 is substantially the same.In contrast, FIG. 4( c) shows the implementation of the presentinvention. In FIG. 4( c), like FIG. 4( b) involves multiple integrationphases 500. However, the length of time for each integration phase 500is not constant. Instead, the integration time stop 520 of each shot isdetermined by either the detection or any motion or a predefined levelof motion, both of which are represented at step 530. This processcontinues until the end of the total integration time requested by thesystem 540, based upon light conditions and other factors.

FIG. 5 is a flow chart showing the implementation of one embodiment ofthe present invention. At step 600 in FIG. 5, a first integration phasebeings. This is typically accompanied by the opening of the camerashutter. At step 610, the camera shutter is kept open for a period ofexposure time, continuing the integration phase. This period of timetypically has a minimum threshold, and it may also have a maximumthreshold. At step 620, the value of one or more motion sensors is read.It is then determined whether the motion sensor output exceeds a motiondetection threshold at step 630. This motion threshold can be zero, orit can be a higher level to permit what is determined to beinsignificant movement. If the motion threshold is not exceeded, thenthe motion sensor or sensors will be read again at a later time. Itshould be noted that this can occur on a continuous basis, or the nextreading could occur after a predefined period of time.

If the motion sensor output exceeds the threshold, then the integrationphase is terminated at step 640. At this point, the camera shuttercloses. The shutter can also close if the maximum period of exposuretime for each frame, also referred to as an integration period, isreached. In still another embodiment of the invention, the shutter couldclose if the total amount of time for taking the complete picture hasexpired. The closing of the camera shutter can also be accompanied bythe generation of an artificial sound, giving the user guidanceregarding the relative movement of the camera or camera module. At step650, the captured frame is processed. This step involves functions suchas color interpolation and others. At step 660, it is determined whetherthe captured frame was the first image shot. If the captured frame wasthe first image shot, then at step 680, the frame and the value of theintegration time is recorded. If the captured frame was not the firstimage shot, then the image shot is registered with respect to the firstimage shot. This occurs at step 670, and is followed by step 680, withthe value of the integration time being updated.

At step 690, it is determined whether the total integration time is lessthan the required integration time for a particular photograph, alsoreferred to as an image capture period. If the total integration time isnot less than the required integration time or the image capture period,then the final pixel values are calculated by combining their values inthe individual registered shots. This is represented at step 700, andthe final image has thus been processed. If, on the other hand, thetotal integration time is less than the required integration time or theimage capture period, then the process returns to step 600, and a newintegration phase begins.

The pixel fusion step 700 can be carried out in various ways. One way isto calculate the final pixel value as a weighted average of its valuesin all of the individual image shots. The most natural weights areexactly the integration time for each shot in a particular embodiment.Thus, by denoting the integration times of the N captured image shots asT₁, T₂, . . . , T_(N), the final value of the pixel located at (x,y)coordinates is given by

${I\left( {x,y} \right)} = \frac{\sum\limits_{n = 1}^{N}{T_{n} \cdot {I_{n}\left( {x,y} \right)}}}{\sum\limits_{n = 1}^{N}T_{n}}$

In this scenario, I_(n), (x,y) denotes the value of the (x,y) pixel inthe n-th image shot.

The present invention is described in the general context of methodsteps, which may be implemented in one embodiment by a program productincluding computer-executable instructions, such as program code,executed by computers in networked environments.

Generally, program modules include routines, programs, objects,components, data structures, etc. that perform particular tasks orimplement particular abstract data types. Computer-executableinstructions, associated data structures, and program modules representexamples of program code for executing steps of the methods disclosedherein. The particular sequence of such executable instructions orassociated data structures represents examples of corresponding acts forimplementing the functions described in such steps.

Software and web implementations of the present invention could beaccomplished with standard programming techniques with rule-based logicand other logic to accomplish the various database searching steps,correlation steps, comparison steps and decision steps. It should alsobe noted that the words “component” and “module” as used herein, and inthe claims, is intended to encompass implementations using one or morelines of software code, and/or hardware implementations, and/orequipment for receiving manual inputs.

The foregoing description of embodiments of the present invention havebeen presented for purposes of illustration and description. It is notintended to be exhaustive or to limit the present invention to theprecise form disclosed, and modifications and variations are possible inlight of the above teachings or may be acquired from practice of thepresent invention. The embodiments were chosen and described in order toexplain the principles of the present invention and its practicalapplication to enable one skilled in the art to utilize the presentinvention in various embodiments and with various modifications as aresuited to the particular use contemplated.

1. A method, comprising: at the beginning of an image capture periodstarting a first integration phase for capturing a frame by opening ashutter of a camera; during the image capture period, if a motion abovea predetermined motion threshold is detected in the camera, ending thefirst integration phase by closing the shutter and saving a firstcaptured frame; if the duration of the first integration phase for thecaptured frame is less than the image capture period, opening theshutter and starting a second integration phase; if a motion above thepredetermined motion threshold is detected in the camera, ending thesecond integration phase by closing the shutter and saving a secondcaptured frame; and at the end of the image capture period, creating afinal picture by combining at least the first and the second capturedframes.
 2. The method of claim 1, wherein motion in the camera isdetected using at least one motion sensor.
 3. The method of claim 2,wherein the at least one motion sensor comprises at least oneaccelerometer.
 4. The method of claim 1, wherein the motion detectionthreshold is automatically adjusted in accordance with a zoom ratio usedwhen capturing the image.
 5. The method of claim 1, wherein the motiondetection threshold is manually adjustable by the user.
 6. The method ofclaim 1, wherein each integration phase has a minimum amount of exposuretime.
 7. The method of claim 1, wherein the beginning of eachintegration phase comprises the opening of the camera shutter, andwherein the end of each integration phase comprises the closing of thecamera shutter.
 8. The method of claim 1, wherein the creation of thefinal picture comprises, for each pixel calculating a final pixel valuebased upon the pixel values in each of the captured images for the samepixel.
 9. The method of claim 1, further comprising processing each ofthe captured frames before saving the captured frames.
 10. The method ofclaim 1, wherein the processing comprises color interpolation.
 11. A setof computer-executable instructions stored in a non-transitorycomputer-readable storage medium, comprising computer executableinstructions for controlling a processor to perform the method ofclaim
 1. 12. A non-transitory computer-readable medium that stores acomputer program, the execution of the computer program by at least oneprocessor results in operations to capture for capturing an image usinga camera over an image capture period, comprising operations of: at abeginning of an image capture period, starting a first integration phasefor capturing a frame by opening a shutter of the camera; during theimage capture period, if a motion above a predetermined motion thresholdis detected in the camera, ending the first integration phase by closingthe shutter and saving a first captured frame; if a duration of thefirst integration phase for the captured frame is less than the imagecapture period, opening the shutter and starting a second integrationphase; if a motion above the predetermined motion threshold is detectedin the camera, ending the second integration phase by closing theshutter and saving a second captured frame; and at the end of the imagecapture period, creating a final picture by combining at least the firstand the second captured frames.
 13. The non-transitory computer-readablemedium of claim 12, wherein the motion detection threshold isautomatically adjusted in accordance with a zoom ratio used whencapturing the image.
 14. The non-transitory computer-readable medium ofclaim 12, wherein the motion detection threshold is manually adjustableby the user.
 15. The non-transitory computer-readable medium of claim12, wherein each integration phase has a minimum amount of exposuretime.
 16. The non-transitory computer-readable medium of claim 12,wherein the beginning of each integration phase comprises the opening ofthe camera shutter, and wherein the end of each integration phasecomprises the closing of the camera shutter.
 17. The non-transitorycomputer-readable medium of claim 12, wherein the creation of the finalpicture comprises for each pixel, calculating a final pixel value basedupon the pixel values in each of the captured images for the same pixel.18. The non-transitory computer-readable medium of claim 12, furthercomprising an operations of processing each of the captured framesbefore saving.
 19. The non-transitory computer-readable medium of claim18, wherein the processing comprises color interpolation.
 20. Anapparatus, comprising: a processor; a camera module comprising a cameraconnected to the processor; and a non-transitory memory unit connectedto the processor and storing computer program instructions executable bythe processor to, at a beginning of an image capture period, start afirst integration phase for capturing a frame by opening a shutter ofthe camera; during the image capture period, if a motion above apredetermined motion threshold is detected in the camera, to end thefirst integration phase by closing the shutter and saving a firstcaptured frame; if a duration of the first integration phase for thecaptured frame is less than the image capture period, to open theshutter and start a second integration phase; if a motion above thepredetermined motion threshold is detected in the camera, to end thesecond integration phase by closing the shutter and saving a secondcaptured frame; and at the end of the image capture period, to create afinal picture by combining at least the first and the second capturedframes.
 21. The apparatus of claim 20, wherein the motion detectionthreshold is automatically adjusted in accordance with a zoom ratio usedwhen a capturing the image.
 22. The apparatus of claim 20, wherein themotion detection threshold is manually adjustable by the user.
 23. Theapparatus of claim 20, wherein the creation of the final picturecomprises for each pixel, calculating a final pixel value based upon thepixel values in each of the captured images for the same pixel.
 24. Theapparatus of claim 20, wherein each integration phase has a minimumamount of exposure time.
 25. The apparatus of claim 20, wherein thememory unit further comprises computer code for processing each of thecaptured frames before saving.
 26. A camera module, comprising: a lenspositioned for focusing an image; a sensor unit receiving the imagefocused by the lens; a processor connected to the sensor unit; and amemory unit connected to the processor, the memory unit includingcomputer code the execution of the computer code by the processorperforms operations comprising, at a beginning of an image captureperiod, starting a first integration phase for capturing a frame byopening a shutter of the camera; during the image capture period, if amotion above a predetermined motion threshold is detected in the camera,ending the first integration phase by closing the shutter and saving afirst captured frame; if a duration of the first integration phase forthe captured frame is less than the image capture period, opening theshutter and starting a second integration phase; if a motion above thepredetermined motion threshold is detected in the camera, ending thesecond integration phase by closing the shutter and saving a secondcaptured frame; and at the end of the image capture period, creating afinal picture by combining at least the first and the second capturedframes.
 27. A computer program embodied in a non-transitorycomputer-readable storage medium and comprising program code forcapturing an image using a camera module over an image capture period,comprising: means for starting a first integration phase at a beginningof an image capture period for capturing a frame by opening a shutter ofthe camera; means for detecting during the image capture period anoccurrence of motion above a predetermined motion threshold and forending the first integration phase by closing the shutter and saving afirst captured frame; means responsive to a determination that aduration of the first integration phase for the captured frame is lessthan the image capture period for opening the shutter and starting asecond integration phase; said means for detecting further configured todetect if a motion above the predetermined motion threshold is detectedfor ending the second integration phase by closing the shutter andsaving a second captured frame; and means, responsive to an end of theimage capture period, for creating a final picture by combining at leastthe first and the second captured frames.